package drds.global_transaction.transaction_coordinator.transaction_session;

import drds.global_transaction.api.api.BranchTransactionStatus;
import drds.global_transaction.api.api.GlobalTransactionStatus;
import drds.global_transaction.api.exception.GlobalTransactionException;

public interface TransactionSessionLifecycleListener
{

	void onAddBranchTransactionSession(GlobalTransactionSession globalTransactionSession, BranchTransactionSession branchTransactionSession) throws GlobalTransactionException;

	void onBeginGlobalTransactionSession(GlobalTransactionSession globalTransactionSession) throws GlobalTransactionException;

	void onBranchTransactionStatusChange(GlobalTransactionSession globalTransactionSession, BranchTransactionSession branchTransactionSession, BranchTransactionStatus status) throws GlobalTransactionException;

	void onCloseGlobalTransactionSession(GlobalTransactionSession globalTransactionSession) throws GlobalTransactionException;

	void onEndGlobalTransactionSession(GlobalTransactionSession globalTransactionSession) throws GlobalTransactionException;

	void onGlobalTransactionStatusChange(GlobalTransactionSession globalTransactionSession, GlobalTransactionStatus status) throws GlobalTransactionException;

	void onRemoveBranchTransactionSession(GlobalTransactionSession globalTransactionSession, BranchTransactionSession branchTransactionSession) throws GlobalTransactionException;
}
